import jurisdictionApi from '@/config/server/api/user.js'

function functionMenuList(info) {
  return jurisdictionApi.jurisdiction.functionMenuList.fetch(info).then(res => {
    return res
  })
}

function functionMenuList2(info) {
  return jurisdictionApi.jurisdiction.functionMenuList2.fetch(info).then(res => {
    return res
  })
}

function functionMenuSave(info) {
  return jurisdictionApi.jurisdiction.functionMenuSave.fetch(info).then(res => {
    return res
  })
}

function functionMenuUpdate(info) {
  return jurisdictionApi.jurisdiction.functionMenuUpdate.fetch(info).then(res => {
    return res
  })
}

function functionMenuDelete(info) {
  return jurisdictionApi.jurisdiction.functionMenuDelete.fetch(info).then(res => {
    return res
  })
}

function permissionMenuList(info) {
  return jurisdictionApi.jurisdiction.permissionMenuList.fetch(info).then(res => {
    return res
  })
}

function permissionMenuSave(info) {
  return jurisdictionApi.jurisdiction.permissionMenuSave.fetch(info).then(res => {
    return res
  })
}

function permissionMenuUpdate(info) {
  return jurisdictionApi.jurisdiction.permissionMenuUpdate.fetch(info).then(res => {
    return res
  })
}

function permissionMenuDelete(info) {
  return jurisdictionApi.jurisdiction.permissionMenuDelete.fetch(info).then(res => {
    return res
  })
}

function permissionMenuBind(info) {
  return jurisdictionApi.jurisdiction.permissionMenuBind.fetch(info).then(res => {
    return res
  })
}

function bindFunctionMenuById(info) {
  return jurisdictionApi.jurisdiction.bindFunctionMenuById.fetch(info).then(res => {
    return res
  })
}

function getPermissionsByRoleId(info) {
  return jurisdictionApi.jurisdiction.getPermissionsByRoleId.fetch(info)
}
export default {
  functionMenuList,
  functionMenuList2,
  functionMenuSave,
  functionMenuUpdate,
  functionMenuDelete,

  permissionMenuList,
  permissionMenuSave,
  permissionMenuUpdate,
  permissionMenuDelete,

  permissionMenuBind,
  bindFunctionMenuById,
  // 根据角色id获取当前角色权限
  getPermissionsByRoleId
}